<?php
define('WWW_DIR', __DIR__);
define('APP_DIR', WWW_DIR . '/../app');
define('LIBS_DIR', WWW_DIR . '/../libs');
define('TMP_DIR', APP_DIR . '/temp');

use Nette\Debug;
use Nette\Environment;
use Nette\Application\Route;
use Nette\Application\SimpleRouter;
use Nette\Application\AlbireoRouter;
use Nette\Loaders\RobotLoader;

use \dibi;

use Celebrio\Core\ModuleLoader;

/* ------------------------------------------------------------- */

require_once LIBS_DIR."/Nette/loader.php";

//$robot = new RobotLoader();
//$robot->addDirectory(APP_DIR);
//$robot->addDirectory(LIBS_DIR);
//$robot->register();


Environment::loadConfig();
Environment::getSession()->start();


$moduleLoader = new ModuleLoader();
$moduleLoader->loadInstalled();



if (!function_exists("_")){
    /**
     * acts like gettext
     * @param String $string
     * @return String
     */
    function _($string) {
        return $string;
    }
}
